%图像旋转,顺时针和逆时针旋转
img1=imread('img.jpg');
tform=maketform("affine",[0 1 0;1 0 0;0 0 1]);
img2=imtransform(img1,tform,"nearest");

subplot(1,2,1);imshow(img1);title("原图");
subplot(1,2,2);imshow(img2);title("转置图");